﻿@model WebTV_Kickstarter.Project

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Edit</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Project</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.Id)

        <div class="form-group">
            @Html.LabelFor(model => model.Title, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </div>
        </div>

        <script type="text/javascript">
                    (function () {
                        tinyMCE.init({
                            selector: "textarea",
                            theme: "modern",
                            menubar: false,
                            statusbar: true,
                            height: "400",
                            width: "400",
                            verify_html: false,
                            theme_simple_resizing: true,
                            content_css: "@Url.Content("~/Content/Site.css")",
                            convert_urls: false,
                            plugins: [
                                "advlist autolink lists link image charmap print preview hr anchor pagebreak",
                                "searchreplace wordcount visualblocks visualchars code fullscreen",
                                "insertdatetime media nonbreaking save table contextmenu directionality",
                                "emoticons  paste textcolor "
                            ],
                            toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
                            toolbar2: "print preview media | forecolor backcolor emoticons",
                        })
                    })();
        </script>
        <div class="form-group">
            @Html.Label("Informatie Pagina", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.TextAreaFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.TotalAmount, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.TotalAmount)
                @Html.ValidationMessageFor(model => model.TotalAmount)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.TotalRating, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.TotalRating)
                @Html.ValidationMessageFor(model => model.TotalRating)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UserId, "UserId", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("UserId", String.Empty)
                @Html.ValidationMessageFor(model => model.UserId)
            </div>
        </div>
        
        <div class="form-group">
            @Html.LabelFor(model => model.NumberOfVotes, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.NumberOfVotes)
                @Html.ValidationMessageFor(model => model.NumberOfVotes)
            </div>
        </div>
        
        <div class="form-group">
            @Html.LabelFor(model => model.NumberOfMessages, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.NumberOfMessages)
                @Html.ValidationMessageFor(model => model.NumberOfMessages)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Terug naar overzicht", "Index")
</div>
